<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <style>
    .box li {
      position: relative;
      float: left;
      list-style: none;
      width: 240px;
      height: 250px;
      border: 1px solid #eee;
      margin-left: -1px;
    }
    .box li:hover {
      border: 1px solid red;
      z-index: 3;
    }
  </style>
  <body>
    <ul class="box">
      <li>1</li>
      <li>2</li>
      <li>3</li>
      <li>4</li>
      <li>5</li>
    </ul>
  </body>
</html>
